package com.wangjie.pattern.strategy.impl;

import com.wangjie.pattern.strategy.BillStrategy;
import com.wangjie.pattern.strategy.BillStrategyFactory;
import org.springframework.stereotype.Component;

@Component
public class WXBillStrategy implements BillStrategy {
    @Override
    public void downloadBill(String type) {
        System.out.println("微信下载账单");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        BillStrategyFactory.register("wx", this);
        System.out.println("wx strategy register success");
    }
}